<!DOCTYPE html>
<html >
<head>
	<meta charset="UTF-8">
	<title>blog</title>
 
    <link rel="stylesheet" href="js/nivo/Nivo-Slider-master/themes/default/default.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="js/nivo/Nivo-Slider-master/themes/light/light.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="js/nivo/Nivo-Slider-master/themes/dark/dark.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="js/nivo/Nivo-Slider-master/themes/bar/bar.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="js/nivo/Nivo-Slider-master/nivo-slider.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
  <link rel="stylesheet"  href="style.css">
</head>
<body>
<?php
 include("function.php");
 $conn = conn();
 $cata_id=$_GET['cata_id'];
 $result=mysqli_query($conn,"select * from catalog ");
 ?>
 
	<div id="wrapper">
        <div class="slider-wrapper theme-default">
            <div id="slider" class="nivoSlider">
                <img src="js/nivo/Nivo-Slider-master/demo/images/toystory.jpg" data-thumb="images/toystory.jpg" alt="" />
                 <img src="js/nivo/Nivo-Slider-master/demo/images/up.jpg" data-thumb="images/toystory.jpg" alt="" />
                
                <img src="js/nivo/Nivo-Slider-master/demo/images/walle.jpg" data-thumb="images/walle.jpg" alt="" data-transition="slideInLeft" />
                <img src="js/nivo/Nivo-Slider-master/demo/images/nemo.jpg" data-thumb="images/nemo.jpg" alt="" />
            </div>
            <div id="htmlcaption" class="nivo-html-caption">
                <strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>. 
            </div>
        </div>

    </div>

	
	
	</div>
	<ul id="nav">
		<li><a href="index4.php">主页</a></li>
		<?php
		while ( $data=mysqli_fetch_assoc($result)) {
        
				?>	
				<li><a href="index4.php"><?php echo $data['name'] ?></a></li>
		<?php
		}
		?>
	</ul>
	<?php
          $result=mysqli_query($conn,"select * from article where catalog_id=$cata_id ");
          while($row= mysqli_fetch_assoc($result)){
	    ?>
	<div id="main">
	    <div id="item">
	    
	      <img src="<?php  echo $row['img'] ?>">
	      <p class="title"><a href="title-line.php?id=<?php  echo $row['id'] ?>"><?php  echo $row['title'] ?></a><span><?php  echo $row['view'] ?>人看过</span></p>
	      <p class="time"><?php  echo date("Y-m-d H:i:s", $row['create_time'] )?></p>
	      <p class="content"><?php  echo $row['desc'] ?></p>
	    </div>
			
	</div>

 <?php
   }
  ?>




</body>
<script type="text/javascript" src="js/nivo/Nivo-Slider-master/demo/scripts/jquery-1.9.0.min.js"></script>
    <script type="text/javascript" src="js/nivo/Nivo-Slider-master/jquery.nivo.slider.js"></script>
    <script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
    </script>

</html>